package com.easygoods.request;


import com.bestvike.stone.spring.exception.AssertUtils;
import com.bestvike.stone.spring.page.PageableRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author zhq
 * @date 2019/1/31
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AcpMemberRequest extends PageableRequest {
    private Integer months;

    @Override
    public void assertValid() {
        super.assertValid();
        AssertUtils.notNull(this.months, "months");
        AssertUtils.isTrue(0 < this.months && this.months <= 12, "months 必须大于0 小于等于 12");
    }
}
